home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
qbbs
/
multisb.zip
/
N1.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-02-16
|
8KB
|
343 lines
@ECHO OFF
REM Check if Frontdoor is allready running...
if exist i:\fd\fd1.up goto FD_UP
Echo Clearing environemental variables...
REM Clear some unused variables for this window
set SHEZEX=
set SHEZWORK=
set LIST=
Echo Setting new variables...
REM Set some new variables specific to this window
REM Remember to use different DSZ log for each node, TCNODE is for Chatman
REM and XRS, LOCK is used in Doors.bat, BAUD is for this batch file to reload
REM BBS for guest users to sign up.
set FD=C:\FD\FD1
set DSZLOG=I:\SBBS\DSZLOG.N1
set DSZPORT=1
set SUPER=Y
set TCNODE=1
set LOCK=38400
set BAUD=0
REM Load DnAnsi and use DvCommand to turn off DV window border
ansi
dc frame off /q
REM The Main Loop...
:FRT_DOOR
REM Use ANSI to set DOS colors
echo
REM Set Baud back to 0, make sure our semaphore to say FD 1 is running is still
REM there, delete downloa1.* ( created by MTS ) delete Sbbs semaphore
REM if XRS packets are in XRS directory, go run Imail to toss
set BAUD=0
if not exist i:\fd\fd1.up rem > i:\fd\fd1.up
if exist e:\uploads\downloa1.* del e:\uploads\downloa1.* > nul
if exist i:\sbbs\n1.up del i:\sbbs\n1.up > nul
if exist c:\sbbs\n1\xrs\*.pkt goto XRSMAIL
REM Fossil command to recapture int 14h
%FOS%
REM Change directories to Sbbs, run sbbsutil to change node status since we are
REM using FD to answer phone.
c:
cd\sbbs
sbbsutil nodestatus 1 2
cd\fd\fd1
cls
REM Bring up Frontdoor, after exit do ????, notice check and delete DOORCFG.BBS
REM from node 1 directory. CONFIG.EXE creates this wherever you run it but it's
REM only needed in main directory
fd
if errorlevel 255 goto FRT_DOOR
if exist c:\sbbs\n1\doorcfg.bbs del c:\sbbs\n1\doorcfg.bbs > nul
REM BBS caller ???? create semaphore to say n1 is up
rem > i:\sbbs\n1.up
if errorlevel 214 goto 14400_baud
if errorlevel 196 goto 9600_baud
if errorlevel 148 goto 4800_baud
if errorlevel 124 goto 2400_baud
if errorlevel 112 goto 1200_baud
if errorlevel 103 goto 300_baud
if errorlevel 100 goto LOCAL
REM No BBS caller, delete semaphore and do some mail stuff
del i:\sbbs\n1.up > nul
if errorlevel 95 goto NET_ECHO
if errorlevel 94 goto ECHO_ONLY
if errorlevel 93 goto NET_ONLY
if errorlevel 90 goto UNPACK_MAIL
if errorlevel 60 goto SDN
if errorlevel 55 goto WEEKLY
if errorlevel 50 goto COMMO
if errorlevel 45 goto MIDNIGHT
if errorlevel 40 goto NIGHTLY
if errorlevel 10 goto QUIT
if errorlevel 5 goto MODEM_INIT
REM Unknown errorlevel, go back
goto FRT_DOOR
REM The next few are to bring BBS up at certain baud rate, note that the baud
REM rate sent with -b is just used for calculating file transfers. Sbbs checks
REM DTR/CTS on modem to send stuff and doesn't seem to use this baud rate for
REM anything else
REM command line help
REM -n<node>
REM -* Do not use EMS for overlay
REM -o Overlay buffer for conventional memory
REM -b<baud>
REM -e<errorlevel> exit with ? errorlevel after caller
REM
REM goto BBS_ERRLVL after exit
:14400_baud
set BAUD=14400
cd\sbbs\n1
bbs -n1 -* -o100000 -b14400 -e0
goto BBS_ERRLVL
:9600_baud
set BAUD=9600
cd\sbbs\n1
bbs -n1 -* -o100000 -b9600 -e0
goto BBS_ERRLVL
:4800_baud
set BAUD=4800
cd\sbbs\n1
bbs -n1 -* -o100000 -b4800 -e0
goto BBS_ERRLVL
:2400_baud
set BAUD=2400
cd\sbbs\n1
bbs -n1 -* -o100000 -b2400 -e0
goto BBS_ERRLVL
:1200_baud
set BAUD=1200
cd\sbbs\n1
bbs -n1 -* -o100000 -b1200 -e0
goto BBS_ERRLVL
:300_baud
set BAUD=300
cd\sbbs\n1
bbs -n1 -* -o100000 -b300 -e0
goto BBS_ERRLVL
:LOCAL
set BAUD=0
cd\sbbs\n1
bbs -n1 -* -o100000 -l -e0
goto BBS_ERRLVL
:RELOAD
cd\sbbs\n1
bbs -n1 -* -o100000 -b%BAUD% -e0
goto BBS_ERRLVL
:RET_BBS
if exist c:\sbbs\n1\doorcfg.bbs del c:\sbbs\n1\doorcfg.bbs > nul
c:
cd\sbbs\n1
bbs -n1 -* -o100000 -R -e0
:BBS_ERRLVL
if errorlevel 80 goto RELOAD
if errorlevel 70 goto RET_BBS
if errorlevel 60 goto DOSDOOR
if errorlevel 50 goto LIST
if exist i:\sbbs\n1.up del i:\sbbs\n1.up
if errorlevel 5 goto NET_ECHO
if errorlevel 4 goto ECHO_ONLY
if errorlevel 3 goto NET_ONLY
if errorlevel 2 goto QUIT
:LOOPBACK
REM Comes back here after caller exit and or MAIL gets processed
if %BAUD%==0 goto FRT_DOOR
dc beep 200,1 0,2 /r=2 /q
if exist sbbsswap.$$$ del sbbsswap.$$$ > nul
REM if node 2 is up don't do the rest, non-multiline stuff
if exist i:\sbbs\n?.up goto FRT_DOOR
cd\sbbs
multiscn c:\sbbs\text\picture.ans
last 5 c:\sbbs\scallers.bbs
if not exist pfiles.bbs goto FRT_DOOR
imthings post /fpfiles.bbs /b18 /wBob_Henderson /sPrivate_Upload
del pfiles.bbs > nul
goto FRT_DOOR
:DOSDOOR
cd\sbbs\n1
QKDOOR QBBS GAP
DOORWAY.EXE SYS /i:c:\ext\doorpass /f /o:t /v:d^U /K:0 /C:DOS
goto RET_BBS
:LIST
cd\sbbs\n1
QKDOOR QBBS GAP
DOORWAY.EXE SYS /i:c:\ext\doorpass /f /o:t /v:d^U /p:c:\xtg\ld.com
goto RET_BBS
:SDN
fdrc poll 1:396/15 crash imm kill
goto FRT_DOOR
:COMMO
if exist i:\fd\fd2.up goto COMMO1
cd\commo
if not exist gedown.now goto FRT_DOOR
del gedown.now
cd\dv
dc open c1-pif.dvp
goto FRT_DOOR
:COMMO1
rem > c:\fd\fd2\fdexit.50
goto FRT_DOOR
:MIDNIGHT
REM the midnight event, to understand this you will have to look at both batch
REM files. The program WAIT! waits for a file to disappear or apprear?
REM Anyways, always check for other nodes before doing anything like packing
REM message base or running door events or ??? bad stuff
if exist i:\sbbs\n?.up goto MIDNIGHT1
if not exist i:\fd\fd2.up call midnight.bat
if not exist i:\fd\fd2.up goto FRT_DOOR
rem > c:\fd\fd2\fdexit.96
wait! t i:\sbbs\fdevent.ok
del i:\sbbs\fdevent.ok > nul
call midnight.bat
rem > i:\sbbs\fdevent.ovr
goto FRT_DOOR
:MIDNIGHT1
rem > c:\fd\fd2\fdexit.45
goto FRT_DOOR
:NIGHTLY
if exist i:\sbbs\n?.up goto NIGHTLY1
if not exist i:\fd\fd2.up call nightly.bat
if not exist i:\fd\fd2.up goto FRT_DOOR
rem > c:\fd\fd2\fdexit.96
wait! t i:\sbbs\fdevent.ok
del i:\sbbs\fdevent.ok > nul
call nightly.bat
rem > i:\sbbs\fdevent.ovr
goto FRT_DOOR
:NIGHTLY1
rem > c:\fd\fd2\fdexit.40
goto FRT_DOOR
:WEEKLY
if exist i:\sbbs\n?.up goto WEEKLY1
if not exist i:\fd\fd2.up call weekly.bat
if not exist i:\fd\fd2.up goto FRT_DOOR
rem > c:\fd\fd2\fdexit.96
wait! t i:\sbbs\fdevent.ok
del i:\sbbs\fdevent.ok > nul
call weekly.bat
rem > i:\sbbs\fdevent.ovr
goto FRT_DOOR
:WEEKLY1
rem > c:\fd\fd2\fdexit.55
goto FRT_DOOR
:NET_ONLY
:NET_ECHO
:ECHO_ONLY
REM Imail does it all
imail scan
goto LOOPBACK
:XRSMAIL
REM XRS mail toss
echo XRS Mail found
copy c:\sbbs\n1\xrs\*.pkt c:\fd\inbound > nul
del c:\sbbs\n1\xrs\*.pkt > nul
:UNPACK_MAIL
REM unack and toss mail
imail toss
imthings import
if exist i:\sbbs\n?.up goto SKIP
import 20 c:\util\imailmbu.log
if errorlevel 20 mbutil link -clean
:SKIP
if not exist c:\fd\inbound\*.tic goto SKIP2
touch c:\fd\inbound\*.*
kdsdn111
tick >> c:\util\tick.log
if exist c:\fd\inbound\*.pkt imail toss
:SKIP2
rem > c:\fd\fd2\fdrescan.now
cd\util\dwarz
if exist c:\fd\inbound\dnet*.* dwarznet
cd\fd\fd1
goto FRT_DOOR
:MODEM_INIT
echo ~~~+++~~~ATH~~~ > COM1
be ask "Press A to abort FD startup! C to Continue." ca default=c timeout=9
if errorlevel 2 goto QUIT
goto FRT_DOOR
:FD_UP
cls
echo Node 1 of Frontdoor is allready running, check the windows...
echo Press ALT, then S to switch and see which windows are open.
echo If things don't look right and no one is on line 1 press ALT
echo then FX to run Fix Frontdoor nodes...
pause
exit
:QUIT
if exist i:\sbbs\n1.up del i:\sbbs\n1.up > nul
if exist i:\fd\fd1.up del i:\fd\fd1.up > nul
sbbsutil nodestatus 1 1
echo ATH1M0 > COM1
exit